Xbasic

html_stritran Function

Syntax

HTML_STRITRAN as c( html as c , search as c [, replace as c])

Arguments

html

html text to search

search

search string. Character

replace

(optional) replacement string. Character

Description

Perform stritran on the plaintext of html.

Discussion

Perform stritran (string replacement, case-insensitive) on the plaintext of html.

Example

? html_stritran("<body> this is in the body </body>","Body","*BODY TAG*")
= "<body> this is in the *BODY TAG* </body>"

html = <<%html%
<p class="Xbasic">Dim txt as c  = "Xbasic"</p>
%html%
 
?html_stritran(html,"Xbasic","<span style=\"color:red;\">Xbasic</span>")
= <p class="Xbasic">Dim txt as c  = "<span style="color:red;">Xbasic</span>"</p>

See Also